import React, { Component } from 'react'
import {Link} from 'react-router-dom'
class ListViewItem extends Component {
    render() {
        const {data,rowId} = this.props
        if(data!=null){
            return (
                <Link to={`/newsDetail/${data.id}`} style={{color:'#000000'}}>
                    <div key={rowId} style={{ padding: '0 15px' }}>
                        <div style={{ display: 'flex', padding: '15px 0' }}>
                            <img style={{ height: '64px', marginRight: '15px' }} src={data.img} alt="" />
                            <div style={{ lineHeight: 1 }}>
                                <div style={{ marginBottom: '8px', fontWeight: 'bold' }}>{data.title}</div>
                                <div><span style={{ fontSize: '12px', color: '#FF6E27' }}>{data.date}</span></div>
                            </div>
                        </div>
                    </div>
                </Link>
            )
        }else{
            return null
        }
        
    }
}

export default ListViewItem